package com.qk.management.mapper;

import com.qk.entity.Dept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *
 * @author lyl
 * @created 2025/9/29 18:58
 * @description
 *
 */
@Mapper
public interface DeptMapper {
    @Select("insert into dept(name,status,create_time,update_time) values(#{name},#{status},#{createTime},#{updateTime})")
    void addDept(Dept dept);

    Integer count(String name, Integer status);

    List<Dept> selectByPage(String name, Integer status, Integer offset, Integer pageSize);

    @Select("select * from dept where id = #{id}")
    Dept getDeptById(Integer id);
}
